﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="index.aspx.cs" Inherits="ncp.Web.index" %>

<%@ Import Namespace="ncp.Business" %>
<%@ Register Assembly="ncp.Controls" Namespace="ncp.Controls" TagPrefix="cc1" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ Register Src="/uc/search.ascx" TagName="search"  TagPrefix="uc" %>
<%@ Register Src="/uc/headTop.ascx" TagName="headTop"  TagPrefix="uc" %>
<%@ Register Src="/uc/headLogo.ascx" TagName="headlogo"  TagPrefix="uc" %>
<%@ Register Src="/uc/headPicture.ascx" TagName="headPicture"  TagPrefix="uc" %>
<%@ Register Src="/uc/menu.ascx" TagName="menu"  TagPrefix="uc" %>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>中国农业信息化服务商</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link href="/css/module.css" rel="stylesheet" type="text/css" />
    <link href="/css/page.css" rel="stylesheet" type="text/css" />
    <link href="/css/reset.css" rel="stylesheet" type="text/css" />
    <script src="/js/jquery-1.7.2.min.js" type="text/javascript"></script>
    <script src="/js/common.js" type="text/javascript"></script>
    <script type="text/javascript">

//图片轮播
var t = n = 0, count;
$(function() {
    getUserInfo();
    picAuto();
    getRecProduct();
    //回车触发登录按钮
    $("#textAccount,#textPwd").keypress(function(e) {
        var key = window.event ? e.keyCode : e.which;
        if (key.toString() == "13") {
            login();
            return false;
        }
    });
});
function login() {
    var username = $.trim($("#textAccount").val());
    var pwd = $("#textPwd").val();
    if (username=="") {
        alert("用户名不能为空！");
        $("#textAccount").focus();
        return;
    }
    if (pwd=="") {
        alert("密码不能为空！");
        $("#textPwd").focus();
        return;
    }
    var response = ncp.Web.index.UserLogin(username, pwd);
    if (response.value != "") {
        var jsonOBJ = eval(response.value)[0];
        if (jsonOBJ.isreload) {
            getUserInfo();
            userStatues();
        } else
            alert(jsonOBJ.msg);
    }
}
//图片轮播
function picAuto() {
    $(".banner-index-lb li").hide().eq(0).show();
    count = $(".banner-index-lb li").length;
    for (var i = 0; i < count; i++) {
        if (i == 0) {
            $(".banner-num").append("<a href=\"javascript:void(0)\" class=\"on\">1</a>&nbsp;");
        } else {
            $(".banner-num").append("<a href=\"javascript:void(0)\">" + (i + 1) + "</a>&nbsp;");
        }
    }
    $(".banner-num a").click(function() {
        var i = $(this).text() - 1; //获取1，2，3，4
        n = i;
        if (i >= count) return;
        $(this).addClass("on");
        $(this).siblings().removeAttr("class");
        $(".banner-index-lb li").hide().eq(i).show();
    });
    t = setInterval("showAuto()", 4000);
    $(".banner-index-lb").hover(function() { clearInterval(t); }, function() { t = setInterval("showAuto()", 4000); });
}

function showAuto() {
	n = n >= (count - 1) ? 0 : ++n;
	$(".banner-num a").eq(n).trigger('click');
}

//新闻tab选项卡
$(function() {
    var arrayObj = new Array();
    arrayObj[0] = "/productsupply/index.html";
    arrayObj[1] = "/productsupply/index.html";
    arrayObj[2] = "/buyingleads/index.html";
    arrayObj[3] = "/movement/index.html";
    $("#firstHeader li").each(function(i) {
        $(this).click(function() {
            if (!$(this).hasClass("on")) {
                $(this).addClass("on");
                $(this).siblings().removeClass("on");
                $(".firstNews").hide();
                $(".firstNews").eq(i).show();
                $("#newsMore a").attr("href", arrayObj[i]);
            }
        });
    });
});


//推荐产品
function getRecProduct() {
    var response = ncp.Web.index.GetRecProduct();
    if (response.value != null) {
        var jsonOBJ = eval(response.value)[0];
        if (jsonOBJ.isreload) {
            $("#recProduct").html(jsonOBJ.msg);
        }
    }
}

//用户状态
function getUserInfo() {
    var response = ncp.Web.index.GetUserInfo();
    if (response.value != null) {
        var jsonOBJ = eval(response.value)[0];
        $("#userInfo").html(jsonOBJ.msg);
    }
}
    </script>
</head>
<body>
    <form id="form1" runat="server">
    
<!--Head Begin-->
	<!--Head Top-->
<uc:headTop id="headtop" runat="server" />
	<!--Head Logo-->
<uc:headlogo id="headlogo" runat="server" />
	<!--Head Nav-->
<div id="head-nav">
	<div id="head-nav-center">
	    <uc:menu ID="menu" runat="server"/>
        <uc:search id="search" runat="server" />
    </div>
</div>
<!--Head End-->
<!--The First Begin-->
<div id="index-banner">
	<!--First Run Pic-->
	<div class="banner-index-lb bh-fl">
	    <uc:headPicture id="headPicture" runat="server" />
        <div class="banner-num">
        </div>
    </div>
    <!--First Check News List-->
    <div class="news-index-qh bh-fl">
    	<div class="news-title">
        	<ul id="firstHeader" class="bh-fl">
            	<li class="on">综合</li>
                <li>最新供应</li>
                <li>最新求购</li>
                <li>浓情动态</li>
                <div class="bh-clear"></div>
            </ul>
            
            <div id="newsMore" class="bh-fr more"><a href="/productsupply/index.html">更多>></a></div>
            <div class="bh-clear"></div>
        </div>
        <div class="news-list">
        	<ul class="firstNews">
            	<asp:Repeater ID="repFirst1" runat="server">
                    <ItemTemplate>
                        <li class="gong"><a target="_blank" href="/product/<%#EncryptHelper.EncryptString(Eval("Product_Id").ToString()) %>.html"><%#CommonBll.CutString(Eval("Product_Title").ToString(), 55, false)%></a></li>
                    </ItemTemplate>
                </asp:Repeater>
                <asp:Repeater ID="repnews1" runat="server">
                    <ItemTemplate>
                        <li class="qiu"><a target="_blank" href="/html/001/<%#EncryptHelper.EncryptString(Eval("News_Id").ToString()) %>.html"><%#CommonBll.CutString(Eval("News_Title").ToString(),55,false) %></a></li>
                    </ItemTemplate>
                </asp:Repeater>
            </ul>
            <ul class="firstNews" style="display: none">
            	<asp:Repeater ID="repProduct1" runat="server">
                    <ItemTemplate>
                        <li class="gong"><a target="_blank" href="/product/<%#EncryptHelper.EncryptString(Eval("Product_Id").ToString()) %>.html"><%#CommonBll.CutString(Eval("Product_Title").ToString(), 55, false)%></a></li>
                    </ItemTemplate>
                </asp:Repeater>
            </ul>
            <ul class="firstNews" style="display: none">
                <asp:Repeater ID="repnews2" runat="server">
                    <ItemTemplate>
                        <li class="qiu"><a target="_blank" href="/html/001/<%#EncryptHelper.EncryptString(Eval("News_Id").ToString()) %>.html"><%#CommonBll.CutString(Eval("News_Title").ToString(),55,false) %></a></li>
                    </ItemTemplate>
                </asp:Repeater>
            </ul>
            <ul class="firstNews" style="display: none">
                <asp:Repeater ID="repnews3" runat="server">
                    <ItemTemplate>
                        <li class="none"><a target="_blank" href="/html/002/<%#EncryptHelper.EncryptString(Eval("News_Id").ToString()) %>.html"><%#CommonBll.CutString(Eval("News_Title").ToString(),55,false) %></a></li>
                    </ItemTemplate>
                </asp:Repeater>
            </ul>
        </div>
    </div>
    <!--First Login-->
    <div class="login-index-yc bh-fr">
    	<div class="form">
    	        <div id="userInfo">
    	        <div class="username"><span>用户名：</span><input id="textAccount" type="text" value="" /></div>
                <div class="password"><span>密　码：</span><input id="textPwd" type="password" value="" /></div>
                <div class="submit"><a href="/register.html" class="zc">免费注册</a><input type="button" onclick="login()" accesskey="enter" value="登　录" /><a href="/forget_passwd.html" class="forget">忘记密码？</a>
                	<div class="bh-clear"></div>
                </div>
    	        </div>
            	
                <div class="givefind"><a href="/member/shop_product.html">建立企业商品</a><a href="/member/shop_buyingLeads.html">发布供求信息</a>
                	<div class="bh-clear"></div>
                </div>
                <div class="joinvip"><a href="/html/vip.html">VIP优势</a><a href="/html/vip.html">加入VIP</a>
                	<div class="bh-clear"></div>
               	</div>
        </div>
        <div id="ad11_1" class="ad">
            <img src="../image/private/pic-2.jpg" width="243" height="46" />
        </div>
    </div>
    <div class="bh-clear"></div>
</div>
<!--The First End-->
<!--Full Ad Begin-->
<div id="ad5_1" class="allmarginauto">
    <img src="../image/private/pic-3.jpg" width="1003" height="85" />
</div>
<!--Full Ad End-->
<!--List Ad Begin-->
<div class="allmarginauto">
    <div class="xad-box">
        <div id="ad4_1" class="xad bh-fl"><a href="#"><img src="../image/private/pic-4.jpg" width="240" height="85" /></a></div>
        <div id="ad4_2" class="xad bh-fl"><a href="#"><img src="../image/private/pic-5.jpg" width="240" height="85" /></a></div>
        <div id="ad4_3" class="xad bh-fl"><a href="#"><img src="../image/private/pic-6.jpg" width="240" height="85" /></a></div>
        <div id="ad4_4" class="xad bh-fl"><a href="#"><img src="../image/private/pic-7.jpg" width="240" height="85" /></a></div>
        <div class="bh-clear"></div>
    </div>
</div>
<!--List Ad End-->
<!--My Content List Begin-->
<div class="index-con">
	<!--Content List Left NewsList-->
	<div class="con-left bh-fl">
    	<div class="news-listindexleft">
        	<h3><span>行情价格</span><a href="/news/006.html">更多</a></h3>
            <ul id="priceList">
                <asp:Repeater ID="reppriceList" runat="server">
                    <ItemTemplate>
                        <li><a target="_blank" href="/html/006/<%#EncryptHelper.EncryptString(Eval("News_Id").ToString()) %>.html"><%#CommonBll.CutString(Eval("News_Title").ToString(),30,false) %></a></li>
                    </ItemTemplate>
                </asp:Repeater>
                
            </ul>
        </div>
        <div class="bh-space"></div>
        <div id="ad6_1" class="xad">
        	<a href="#"><img src="../image/private/pic-8.jpg" width="204" height="60" /></a>
        </div>
        <div class="bh-space"></div>
        <div id="ad6_2" class="xad">
        	<a href="#"><img src="../image/private/pic-8.jpg" width="204" height="60" /></a>
        </div>
        <div class="bh-space"></div>
        <div class="news-listindexleft">
        	<h3><span>专家指导</span><a href="/news/011.html">更多</a></h3>
            <ul id="expertList">
                <asp:Repeater ID="repexpertList" runat="server">
                    <ItemTemplate>
                        <li><a target="_blank" href="/html/011/<%#EncryptHelper.EncryptString(Eval("News_Id").ToString()) %>.html"><%#CommonBll.CutString(Eval("News_Title").ToString(),30,false) %></a></li>
                    </ItemTemplate>
                </asp:Repeater>
            </ul>
        </div>
        <div class="bh-space"></div>
        <div id="ad6_3" class="xad">
        	<a href="#"><img src="../image/private/pic-8.jpg" width="204" height="60" /></a>
        </div>
        <div class="bh-space"></div>
        <div id="ad6_4" class="xad">
        	<a href="#"><img src="../image/private/pic-8.jpg" width="204" height="60" /></a>
        </div>
        <div class="bh-space"></div>
        <div class="news-listindexleft">
        	<h3><span>科普知识</span><a href="/scientific/index.html">更多</a></h3>
            <ul id="scientificList">
                <asp:Repeater ID="repscientificList" runat="server">
                    <ItemTemplate>
                        <li><a target="_blank" href="/html/003/<%#EncryptHelper.EncryptString(Eval("News_Id").ToString()) %>.html"><%#CommonBll.CutString(Eval("News_Title").ToString(),30,false) %></a></li>
                    </ItemTemplate>
                </asp:Repeater>
            </ul>
        </div>
        <div class="bh-space"></div>
        <div id="ad6_5" class="xad">
        	<a href="#"><img src="../image/private/pic-8.jpg" width="204" height="60" /></a>
        </div>
        <div class="bh-space"></div>
        <div id="ad6_6" class="xad">
        	<a href="#"><img src="../image/private/pic-8.jpg" width="204" height="60" /></a>
        </div>
        <div class="bh-space"></div>
    </div>
    <!--Content List Center CategoryList-->
    <!--#include file="/uc/indexGoodsClass.htm"-->

    <!--Content List Right NewsList-->
    <div class="con-right bh-fr">
    	<div class="r-newslist">
        	<div class="title">
            	<h3>行业之星</h3>
                
                <div class="bh-clear"></div>
            </div>
            <div class="con">
            	<ul id="star">
            	<asp:Repeater ID="repStar" runat="server">
                    <ItemTemplate>
                        <li><a target="_blank" href="/shop<%#CommonBll.BuildShopId(Convert.ToInt32(Eval("Client_Id").ToString())) %>/about.html"><%#CommonBll.CutString(Eval("Client_Name").ToString(), 30, false)%></a></li>
                    </ItemTemplate>
                </asp:Repeater>
                </ul>
            </div>
            <div class="bh-clear"></div>
        </div>
        <div class="ad-ggzz">
            <div id="ad7_1" class="adstats bh-fl">
                <a href="#"><img src="../image/private/pic-10.jpg" width="92" height="48" /></a>
            </div>
            <div id="ad7_2" class="adstats bh-fl">
                <a href="#"><img src="../image/private/pic-10.jpg" width="92" height="48" /></a>
            </div>
            <div id="ad7_3" class="adstats bh-fl">
                <a href="#"><img src="../image/private/pic-10.jpg" width="92" height="48" /></a>
            </div>
            <div id="ad7_4" class="adstats bh-fl">
                <a href="#"><img src="../image/private/pic-10.jpg" width="92" height="48" /></a>
            </div>
            <div class="bh-clear"></div>
        </div>
        <div class="r-newslist">
        	<div class="title">
            	<h3>推荐企业</h3>
                
                <div class="bh-clear"></div>
            </div>
            <div class="con">
            	<ul id="recClient">
            	    <asp:Repeater ID="repRecClient" runat="server">
                    <ItemTemplate>
                        <li><a target="_blank" href="/shop<%#CommonBll.BuildShopId(Convert.ToInt32(Eval("Client_Id").ToString())) %>/about.html"><%#CommonBll.CutString(Eval("Client_Name").ToString(), 30, false)%></a></li>
                    </ItemTemplate>
                </asp:Repeater>
                </ul>
            </div>
            <div class="bh-clear"></div>
        </div>
        <div class="ad-ggzz">
            <div id="ad7_5" class="adstats bh-fl">
                <a href="#"><img src="../image/private/pic-10.jpg" width="92" height="48" /></a>
            </div>
            <div id="ad7_6" class="adstats bh-fl">
                <a href="#"><img src="../image/private/pic-10.jpg" width="92" height="48" /></a>
            </div>
            <div id="ad7_7" class="adstats bh-fl">
                <a href="#"><img src="../image/private/pic-10.jpg" width="92" height="48" /></a>
            </div>
            <div id="ad7_8" class="adstats bh-fl">
                <a href="#"><img src="../image/private/pic-10.jpg" width="92" height="48" /></a>
            </div>
            <div class="bh-clear"></div>
        </div>
        <div class="r-newslist">
        	<div class="title">
            	<h3>推荐产品</h3>
                <div class="more"><a href="/productsupply/index.html">更多</a></div>
                <div class="bh-clear"></div>
            </div>
            <div id="recProduct" class="con">
            	<dl>
                	<dt><a href="#"><img src="image/private/pic-9.jpg" width="50" height="50" /></a></dt>
                    <dd class="protitle"><a href="#">撒大家看哈是否</a></dd>
                    <dd class="proprice"><span> ￥50.80</span><b>45.00</b></dd>
                    <dd class="pro-num hottop">1</dd>
                    <div class="bh-clear"></div>
                </dl>
                <dl>
                	<dt><a href="#"><img src="image/private/pic-9.jpg" width="50" height="50" /></a></dt>
                    <dd class="protitle"><a href="#">撒大家看哈是否</a></dd>
                    <dd class="proprice"><span> ￥50.80</span><b>45.00</b></dd>
                    <dd class="pro-num hottop">2</dd>
                    <div class="bh-clear"></div>
                </dl>
                <dl>
                	<dt><a href="#"><img src="image/private/pic-9.jpg" width="50" height="50" /></a></dt>
                    <dd class="protitle"><a href="#">撒大家看哈是否</a></dd>
                    <dd class="proprice"><span> ￥50.80</span><b>45.00</b></dd>
                    <dd class="pro-num hotcen">3</dd>
                    <div class="bh-clear"></div>
                </dl>
                <dl>
                	<dt><a href="#"><img src="image/private/pic-9.jpg" width="50" height="50" /></a></dt>
                    <dd class="protitle"><a href="#">撒大家看哈是否</a></dd>
                    <dd class="proprice"><span> ￥50.80</span><b>45.00</b></dd>
                    <dd class="pro-num hotbot">4</dd>
                    <div class="bh-clear"></div>
                </dl>
                <dl>
                	<dt><a href="#"><img src="image/private/pic-9.jpg" width="50" height="50" /></a></dt>
                    <dd class="protitle"><a href="#">撒大家看哈是否</a></dd>
                    <dd class="proprice"><span> ￥50.80</span><b>45.00</b></dd>
                    <dd class="pro-num hotbot">5</dd>
                    <div class="bh-clear"></div>
                </dl>
            </div>
            <div class="bh-clear"></div>
        </div>
    </div>
    <div class="bh-space"></div>
</div>
<!--My Content List End-->

<!--Full Ad Begin-->
<div id="ad5_2" class="allmarginauto">
    <a href="#"><img src="../image/private/pic-3.jpg" width="1003" height="85" /></a>
</div>
<!--Full Ad End-->
<!--List Ad Begin-->
<div class="allmarginauto">
    <div class="xad-box">
        <div id="ad4_5" class="xad bh-fl"><a href="#"><img src="../image/private/pic-4.jpg" width="240" height="85" /></a></div>
        <div id="ad4_6" class="xad bh-fl"><a href="#"><img src="../image/private/pic-5.jpg" width="240" height="85" /></a></div>
        <div id="ad4_7" class="xad bh-fl"><a href="#"><img src="../image/private/pic-6.jpg" width="240" height="85" /></a></div>
        <div id="ad4_8" class="xad bh-fl"><a href="#"><img src="../image/private/pic-7.jpg" width="240" height="85" /></a></div>
        <div class="bh-clear"></div>
    </div>
</div>
<!--List Ad End-->
<!--The Last Begin-->
<div class="index-last">
	<!--Last LeftList-->
	<div class="index-last-left bh-fl">
    	<div class="list">
        	<div class="title">
            	<h3>行业展会</h3>
                <div class="more"><a href="/news/005.html">更多</a></div>
                <div class="bh-clear"></div>
            </div>
            <div class="con">
            	<ul class="toptitle">
                	<li class="name">展会内容</li>
                    <li class="address">展会地址</li>
                    <li class="time">展会时间</li>
                    <div class="bh-clear"></div>
                </ul>
                <div id="showList">
                    <asp:Repeater ID="repShowList" runat="server">
                    <ItemTemplate>
                        <ul>
                	        <li class="name"><a target="_blank" href="/html/005/<%#EncryptHelper.EncryptString(Eval("News_Id").ToString()) %>.html"><%#CommonBll.CutString(Eval("News_Title").ToString(), 50, false)%></a></li>
                            <li class="address"><span><%#Eval("News_Addr")%></span></li>
                            <li class="time"><%#Eval("News_StartDate", "{0:yyyy/MM/dd}")%>--<%#Eval("News_EndDate", "{0:yyyy/MM/dd}")%></li>
                            <div class="bh-clear"></div>
                        </ul>
                    </ItemTemplate>
                    </asp:Repeater>
                </div>
                
            </div>
        </div>
        <div class="bh-space"></div>
        <div class="list">
        	<div class="title">
            	<h3>友情链接</h3>
                <div class="more"><%--<a href="#">申请链接</a>--%></div>
                <div class="bh-clear"></div>
            </div>
            <div class="con">
            	<div class="link-list">
                    <asp:Repeater ID="repLink" runat="server">
                        <ItemTemplate>
                            <a target="_blank" href="http://<%#Eval("Link_Addr") %>"><%#Eval("Link_Name")%></a><span>|</span>
                        </ItemTemplate>
                    </asp:Repeater>
                </div>
            </div>
        </div>
    </div>
    <!--Last RightList-->
    <div class="index-last-right bh-fr">
    	<div class="title">
        	<h3>政策法规</h3>            
            <div class="more"><a href="/news/004.html">更多</a></div>
            <div class="bh-clear"></div>
        </div>
        <ul id="policyList">
        	<asp:Repeater ID="reppolicyList" runat="server">
                    <ItemTemplate>
                        <li><a target="_blank" href="/html/004/<%#EncryptHelper.EncryptString(Eval("News_Id").ToString()) %>.html"><%#CommonBll.CutString(Eval("News_Title").ToString(),30,false) %></a></li>
                    </ItemTemplate>
                </asp:Repeater>
            <li id="ad10_1" class="zcfg-ad">
                <a href="#"><img src="../image/private/pic-11.jpg" width="214" height="146" /></a>
            </li>
        </ul>
    </div>
    <div class="bh-clear"></div>
</div>
<!--The Last End-->
<!--Foot Begin-->
<!--#include file="/uc/footer.htm"-->
<!--Foot End-->
    </form>
</body>
</html>
<script type="text/javascript">

    $(function() {
        var response = ncp.Web.index.GetADList();
        if (response.value != null) {
            var jsonOBJ = eval(response.value)[0];
            $("#ad11_1").html(jsonOBJ.ad11_1);
            
            $("#ad4_1").html(jsonOBJ.ad4_1);
            $("#ad4_2").html(jsonOBJ.ad4_2);
            $("#ad4_3").html(jsonOBJ.ad4_3);
            $("#ad4_4").html(jsonOBJ.ad4_4);
            $("#ad4_5").html(jsonOBJ.ad4_5);
            $("#ad4_6").html(jsonOBJ.ad4_6);
            $("#ad4_7").html(jsonOBJ.ad4_7);
            $("#ad4_8").html(jsonOBJ.ad4_8);
            
            $("#ad5_1").html(jsonOBJ.ad5_1);
            $("#ad5_2").html(jsonOBJ.ad5_2);
            
            $("#ad6_1").html(jsonOBJ.ad6_1);
            $("#ad6_2").html(jsonOBJ.ad6_2);
            $("#ad6_3").html(jsonOBJ.ad6_3);
            $("#ad6_4").html(jsonOBJ.ad6_4);
            $("#ad6_5").html(jsonOBJ.ad6_5);
            $("#ad6_6").html(jsonOBJ.ad6_6);

            $("#ad7_1").html(jsonOBJ.ad7_1);
            $("#ad7_2").html(jsonOBJ.ad7_2);
            $("#ad7_3").html(jsonOBJ.ad7_3);
            $("#ad7_4").html(jsonOBJ.ad7_4);
            $("#ad7_5").html(jsonOBJ.ad7_5);
            $("#ad7_6").html(jsonOBJ.ad7_6);
            $("#ad7_7").html(jsonOBJ.ad7_7);
            $("#ad7_8").html(jsonOBJ.ad7_8);

            $("#ad10_1").html(jsonOBJ.ad10_1);
        }
    });
</script>